-
-
Couldn't load subscription status.
- Fork 4.2k
Make tracing Optional for bevy_utils
#15879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make tracing Optional for bevy_utils
#15879
Conversation
95c0c68 to
bb237d8
Compare
|
I don't quite follow the strategy here. It looks like we're unconditionally calling the |
Co-Authored-By: Alice Cecile <[email protected]>
Co-Authored-By: Alice Cecile <[email protected]>
|
I've also updated the migration guide since this is now only just barely a breaking change. |
|
Just a small sidenote, log has a much higher performance overhead than tracing for spammy logs and log filtering (see gfx-rs/wgpu#6046 (comment) for why). |
|
I think the re-exporting of log as tracing should be avoided. I would prefer to take the breaking change in this PR, and re-exports the common functions and macros between tracing and log as bevy_utils::log, and use that through the engine |
|
These are both excellent points. I will update the documentation to indicate that users should prefer to use the I'm leaning towards only exporting |
Objective
bevy_utilsto compile on platforms without atomic CAS operations (e.g., GameBoy Advancethumbv4t-none-eabi)no_stdBevy #15460Solution
tracingoptional (behind thetracingfeature, enabled by default).logwithinbevy_utils, and exported it astracing.Testing
cargo build --target thumbv4t-none-eabiMigration Guide
If you were using
bevy_utilswith default features disabled, and you relied on thetracingre-export, and you relied on atracingitem that is not available inlog, enable thetracingfeature.Notes
tracinghas built-in support for capturing logs fromlogand this is enabled by default. The biggest loss going fromlogtotracingis the loss ofinfo_span/etc. Otherwise, the crates are largely identical in behaviour, withloghaving no dependencies and more popularity on crates.io.